<?php

namespace app\shop\model;

class Cart extends \ShopModel
{
    protected $table = 'sh_cart';

//    protected $pk = 'cart_id';

    protected $autoWriteTimestamp = true;
    protected $updateTime = false;
    protected $createTime = 'create_at';

    // 一条记录对应一个商品
    public function goods()
    {
        return $this->hasOne('Goods', 'goods_id', 'goods_id');
    }
}
